let age: number = 20;
let isStudent: boolean = true;
let name1: string = "Aman";
console.log(name1);
console.log(age);
console.log(isStudent);
// Array
let numbers: number[] = [1, 2, 3, 4, 5];
let names: string[] = ["Aman", "Rohit", "Rahul"];


function add(a: number, b: number): number {
    return a + b;
}

//接口
interface Person {
    name: string;
    age: number;
}


let person: Person = { name: "Aman", age: 20 };

//类型别名
type Point = {
    x: number;
    y: number;
}

const p: Point = { x: 10, y: 20 };


//交叉类型
//将多个类型合并成一个新的类型。这个类型将具有所有成员类型的特效。通过&操作符实现
type a = {
    name: string;
}

type b = {
    age: number;
}

type c = a & b;